package sanshui.system.trade.db.mapper;

import org.apache.ibatis.annotations.Select;
import sanshui.system.trade.pojo.StockInfoVo;

import java.util.List;

public interface TradeDataTblMapper {

    @Select("SELECT MAX(trade_account.acc_id)+1 FROM trade.trade_account;")
    Long accNowId();
    @Select("SELECT MAX(trade_worker.worker_id)+1 FROM trade.trade_worker;")
    Long workerNowId();
    @Select("SELECT MAX(trade_his_op_pos.op_id)+1 FROM trade.trade_his_op_pos;")
    Long opNowId();
    @Select("SELECT MAX(trade_report.report_id)+1 FROM trade.trade_report;")
    Long reportNowId();

    @Select("SELECT MAX(trade_limit_order.limit_id)+1 FROM trade.trade_limit_order;")
    Long limitNowId();

    List<StockInfoVo> selectHisData(String code, String market, String startDate, String endDate);
    int countHisData(String code, String market, String startDate, String endDate);
    StockInfoVo selectData(String code, String market, String tradeDate);

    List<StockInfoVo> selectRtData(List<String> codes, String tradeTime16, String dbSource);
    List<StockInfoVo> selectCurrentRtData(List<String> codes, String tradeTime16, String dbSource);

    List<StockInfoVo> selectShunShiData(String dateTime, List<String> codes, String timestamp);


}
